add_library(nf7_iface)
target_link_libraries(nf7_iface
  PUBLIC
    git_hash
    nf7_config
)
target_sources(nf7_iface
  PRIVATE
    common/exception.cc
    common/mutex.cc
    version.cc
  PUBLIC
    common/container.hh
    common/exception.hh
    common/future.hh
    common/leak_detector.hh
    common/mutex.hh
    common/observer.hh
    common/observer.hh
    common/sql.hh
    common/task.hh
    common/task_context.hh
    common/value.hh
    common/void.hh
    subsys/concurrency.hh
    subsys/database.hh
    subsys/dealer.hh
    subsys/interface.hh
    subsys/logger.hh
    subsys/meta_env.hh
    subsys/parallelism.hh
    env.hh
    lambda.hh
    version.hh
)

add_executable(nf7_iface_test)
target_sources(nf7_iface_test
  PRIVATE
    common/container_test.cc
    common/future_test.cc
    common/leak_detector_test.cc
    common/mutex_test.cc
    common/observer_test.cc
    common/observer_test.hh
    common/task_test.cc
    common/task_test.hh
    common/value_test.cc
    subsys/logger_test.hh
)
target_link_libraries(nf7_iface_test
  PRIVATE
    nf7_iface
    GTest::gmock_main
    GTest::gtest_main
)
include(GoogleTest)
gtest_discover_tests(nf7_iface_test)
